package com.qf.mybatis01.dao;

import com.qf.mybatis01.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserDao {
    //根据用户的id查询用户
    public User selectUserById(Integer id);
    //根据id和密码查询用户
    public User selectUserByIdAndPwd(Integer id , String pwd);
    //根据名字和密码
    public User selectUserByNameAndPwd(@Param("username") String name ,@Param("password") String pwd);

    public User selectUserByNameAndPwd_map(Map map);

    public User selectUserByNameAndPwd_obj(User user);

    public List<User> selectUserByName(@Param("keyword") String keyword);

    //删除方法
    public int deleteUserById(@Param("id") Integer id);
    //修改方法
    public int updateUserById(User user);
    //添加方法
    public int insterUser(User user);
    //alt+回车  召唤小鸟帮你写代码
   // public User selectAll();
}
